import request from "@/utils/request";

// 机房列表条件查询
export function labList(data) {
  return request({
    url: "/system/lab/list",
    method: "post",
    data: data,
  });
}

// 机房列表详情查询
export function labDetails(labId) {
  return request({
    url: `/system/lab/${labId}`,
    method: "get",
  });
}

// 机房预约
export function appointment(data) {
  return request({
    url: `/system/appointment`,
    method: "post",
    data,
  });
}

// 机房预约进度列表
export function appointmentList(params) {
  return request({
    url: `/system/appointment/list`,
    method: "get",
    params,
  });
}

// 机房取消预约
export function appointmentUpdate(data) {
  return request({
    url: `/system/appointment/update`,
    method: "post",
    data,
  });
}

// 机房修改
export function labUpdate(data) {
  return request({
    url: `/system/lab/update`,
    method: "post",
    data,
  });
}

// 机房添加
export function labAdd(data) {
  return request({
    url: `/system/lab`,
    method: "post",
    data,
  });
}

// 机房删除
export function labDel(data) {
  return request({
    url: `/system/lab/${data.labId}`,
    method: "post",
  });
}

// 预约总量统计
export function appointmentCount(data) {
  return request({
    url: `/system/appointment/count`,
    method: "post",
  });
}

// 实验室审核
export function appointmentAudit(data) {
  return request({
    url: `/system/appointment/audit`,
    method: "post",
    data,
  });
}

// 七天之内预约数量
export function reservationStatistics(params) {
  return request({
    url: `/system/appointment/reservationStatistics`,
    method: "get",
    params,
  });
}

// 统计机房列表条件查询
export function resList(data) {
  return request({
    url: `/system/appointment/resList`,
    method: "post",
    data,
  });
}
